<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>局部组件的概念</title>
</head>
<body>
<div id="app">
  <my-component></my-component>
</div>

<script type="module">
  import {createApp, defineComponent} from "../../../../js/vue.esm-browser.js";

  // 定义组件
  let component = defineComponent(
          {
            template:
                    "<h1>Hello, World!</h1><h1>世界，你好！</h1>"
          }
  );

  let app = createApp({
    setup(){
      return {}
    },

    components:{
      myComponent:  component
    }
  })

  app.mount("#app")
</script>
</body>
</html>